BOOST_INCLUDE = /usr/include/boost-1_35
BOOST_LIBS = /usr/lib
LIBS = -lboost_thread-gcc34-mt -lboost_filesystem-gcc34-mt -lboost_system-gcc34-mt
MLOG_INCLUDE = ../include

OFLAGS = -g
CPP = g++
CHARSET_FLAGS = -finput-charset=cp866 -fexec-charset=CP1251
CPPFLAGS = $(OFLAGS) -Wall -Wno-switch -Wno-reorder -I$(BOOST_INCLUDE) -I$(MLOG_INCLUDE) $(CHARSET_FLAGS)
LD = g++
LDFLAGS = -L$(BOOST_LIBS) $(OFLAGS)

all: test_main test_thread

clean:
	rm -f *.o *.exe *.log test_thread test_main file2.log.*

%.o : %.cpp
	$(CPP) $(CPPFLAGS) -c $<

test_main: test_main.o test_light.o
	$(LD) $(LDFLAGS) test_main.o test_light.o $(LIBS) -o test_main

test_thread: threading_test.o threading_setup.o
	$(LD) $(LDFLAGS) threading_test.o threading_setup.o $(LIBS) -o test_thread

.PHONY : clean test_main test_thread
